cmake_minimum_required(VERSION 3.20)


project(server)

set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)



file(GLOB_RECURSE SERVER_SOURCES
    "src/*.cpp"
)

link_directories(${CMAKE_SOURCE_DIR}/lib)

add_executable(${PROJECT_NAME} ${SERVER_SOURCES})

target_include_directories(${PROJECT_NAME} PRIVATE 
    "${CMAKE_CURRENT_SOURCE_DIR}/thirdparty" 
    "${CMAKE_CURRENT_SOURCE_DIR}/header"
    )
target_link_libraries(${PROJECT_NAME} PRIVATE
    sqlite3)

if(MSVC)
    # 强制MSVC使用UTF-8编码解析源文件
    target_compile_options(${PROJECT_NAME} PRIVATE /utf-8)
endif()

